package ai.people.core.grpc.lib.es;

import static io.grpc.MethodDescriptor.generateFullMethodName;

/**
 * <pre>
 * 舆情预警信息-查询打标签的信息
 * </pre>
 */
@javax.annotation.Generated(
    value = "by gRPC proto compiler (version 1.42.0)",
    comments = "Source: es/warning-message.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class WarningMessageServiceGrpc {

  private WarningMessageServiceGrpc() {}

  public static final String SERVICE_NAME = "es.WarningMessageService";

  // Static method descriptors that strictly reflect the proto.
  private static volatile io.grpc.MethodDescriptor<ai.people.core.grpc.lib.es.WarningMessageGrpcRequest,
      ai.people.core.grpc.lib.es.SearchPageResponse> getWarningMessageMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "warningMessage",
      requestType = ai.people.core.grpc.lib.es.WarningMessageGrpcRequest.class,
      responseType = ai.people.core.grpc.lib.es.SearchPageResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor<ai.people.core.grpc.lib.es.WarningMessageGrpcRequest,
      ai.people.core.grpc.lib.es.SearchPageResponse> getWarningMessageMethod() {
    io.grpc.MethodDescriptor<ai.people.core.grpc.lib.es.WarningMessageGrpcRequest, ai.people.core.grpc.lib.es.SearchPageResponse> getWarningMessageMethod;
    if ((getWarningMessageMethod = WarningMessageServiceGrpc.getWarningMessageMethod) == null) {
      synchronized (WarningMessageServiceGrpc.class) {
        if ((getWarningMessageMethod = WarningMessageServiceGrpc.getWarningMessageMethod) == null) {
          WarningMessageServiceGrpc.getWarningMessageMethod = getWarningMessageMethod =
              io.grpc.MethodDescriptor.<ai.people.core.grpc.lib.es.WarningMessageGrpcRequest, ai.people.core.grpc.lib.es.SearchPageResponse>newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "warningMessage"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  ai.people.core.grpc.lib.es.WarningMessageGrpcRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  ai.people.core.grpc.lib.es.SearchPageResponse.getDefaultInstance()))
              .setSchemaDescriptor(new WarningMessageServiceMethodDescriptorSupplier("warningMessage"))
              .build();
        }
      }
    }
    return getWarningMessageMethod;
  }

  /**
   * Creates a new async stub that supports all call types for the service
   */
  public static WarningMessageServiceStub newStub(io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory<WarningMessageServiceStub> factory =
      new io.grpc.stub.AbstractStub.StubFactory<WarningMessageServiceStub>() {
        @java.lang.Override
        public WarningMessageServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new WarningMessageServiceStub(channel, callOptions);
        }
      };
    return WarningMessageServiceStub.newStub(factory, channel);
  }

  /**
   * Creates a new blocking-style stub that supports unary and streaming output calls on the service
   */
  public static WarningMessageServiceBlockingStub newBlockingStub(
      io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory<WarningMessageServiceBlockingStub> factory =
      new io.grpc.stub.AbstractStub.StubFactory<WarningMessageServiceBlockingStub>() {
        @java.lang.Override
        public WarningMessageServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new WarningMessageServiceBlockingStub(channel, callOptions);
        }
      };
    return WarningMessageServiceBlockingStub.newStub(factory, channel);
  }

  /**
   * Creates a new ListenableFuture-style stub that supports unary calls on the service
   */
  public static WarningMessageServiceFutureStub newFutureStub(
      io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory<WarningMessageServiceFutureStub> factory =
      new io.grpc.stub.AbstractStub.StubFactory<WarningMessageServiceFutureStub>() {
        @java.lang.Override
        public WarningMessageServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new WarningMessageServiceFutureStub(channel, callOptions);
        }
      };
    return WarningMessageServiceFutureStub.newStub(factory, channel);
  }

  /**
   * <pre>
   * 舆情预警信息-查询打标签的信息
   * </pre>
   */
  public static abstract class WarningMessageServiceImplBase implements io.grpc.BindableService {

    /**
     */
    public void warningMessage(ai.people.core.grpc.lib.es.WarningMessageGrpcRequest request,
        io.grpc.stub.StreamObserver<ai.people.core.grpc.lib.es.SearchPageResponse> responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getWarningMessageMethod(), responseObserver);
    }

    @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
      return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
          .addMethod(
            getWarningMessageMethod(),
            io.grpc.stub.ServerCalls.asyncUnaryCall(
              new MethodHandlers<
                ai.people.core.grpc.lib.es.WarningMessageGrpcRequest,
                ai.people.core.grpc.lib.es.SearchPageResponse>(
                  this, METHODID_WARNING_MESSAGE)))
          .build();
    }
  }

  /**
   * <pre>
   * 舆情预警信息-查询打标签的信息
   * </pre>
   */
  public static final class WarningMessageServiceStub extends io.grpc.stub.AbstractAsyncStub<WarningMessageServiceStub> {
    private WarningMessageServiceStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected WarningMessageServiceStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new WarningMessageServiceStub(channel, callOptions);
    }

    /**
     */
    public void warningMessage(ai.people.core.grpc.lib.es.WarningMessageGrpcRequest request,
        io.grpc.stub.StreamObserver<ai.people.core.grpc.lib.es.SearchPageResponse> responseObserver) {
      io.grpc.stub.ClientCalls.asyncUnaryCall(
          getChannel().newCall(getWarningMessageMethod(), getCallOptions()), request, responseObserver);
    }
  }

  /**
   * <pre>
   * 舆情预警信息-查询打标签的信息
   * </pre>
   */
  public static final class WarningMessageServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub<WarningMessageServiceBlockingStub> {
    private WarningMessageServiceBlockingStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected WarningMessageServiceBlockingStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new WarningMessageServiceBlockingStub(channel, callOptions);
    }

    /**
     */
    public ai.people.core.grpc.lib.es.SearchPageResponse warningMessage(ai.people.core.grpc.lib.es.WarningMessageGrpcRequest request) {
      return io.grpc.stub.ClientCalls.blockingUnaryCall(
          getChannel(), getWarningMessageMethod(), getCallOptions(), request);
    }
  }

  /**
   * <pre>
   * 舆情预警信息-查询打标签的信息
   * </pre>
   */
  public static final class WarningMessageServiceFutureStub extends io.grpc.stub.AbstractFutureStub<WarningMessageServiceFutureStub> {
    private WarningMessageServiceFutureStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected WarningMessageServiceFutureStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new WarningMessageServiceFutureStub(channel, callOptions);
    }

    /**
     */
    public com.google.common.util.concurrent.ListenableFuture<ai.people.core.grpc.lib.es.SearchPageResponse> warningMessage(
        ai.people.core.grpc.lib.es.WarningMessageGrpcRequest request) {
      return io.grpc.stub.ClientCalls.futureUnaryCall(
          getChannel().newCall(getWarningMessageMethod(), getCallOptions()), request);
    }
  }

  private static final int METHODID_WARNING_MESSAGE = 0;

  private static final class MethodHandlers<Req, Resp> implements
      io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
      io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
      io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
      io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
    private final WarningMessageServiceImplBase serviceImpl;
    private final int methodId;

    MethodHandlers(WarningMessageServiceImplBase serviceImpl, int methodId) {
      this.serviceImpl = serviceImpl;
      this.methodId = methodId;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("unchecked")
    public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {
      switch (methodId) {
        case METHODID_WARNING_MESSAGE:
          serviceImpl.warningMessage((ai.people.core.grpc.lib.es.WarningMessageGrpcRequest) request,
              (io.grpc.stub.StreamObserver<ai.people.core.grpc.lib.es.SearchPageResponse>) responseObserver);
          break;
        default:
          throw new AssertionError();
      }
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("unchecked")
    public io.grpc.stub.StreamObserver<Req> invoke(
        io.grpc.stub.StreamObserver<Resp> responseObserver) {
      switch (methodId) {
        default:
          throw new AssertionError();
      }
    }
  }

  private static abstract class WarningMessageServiceBaseDescriptorSupplier
      implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
    WarningMessageServiceBaseDescriptorSupplier() {}

    @java.lang.Override
    public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
      return ai.people.core.grpc.lib.es.WarningMessage.getDescriptor();
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
      return getFileDescriptor().findServiceByName("WarningMessageService");
    }
  }

  private static final class WarningMessageServiceFileDescriptorSupplier
      extends WarningMessageServiceBaseDescriptorSupplier {
    WarningMessageServiceFileDescriptorSupplier() {}
  }

  private static final class WarningMessageServiceMethodDescriptorSupplier
      extends WarningMessageServiceBaseDescriptorSupplier
      implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
    private final String methodName;

    WarningMessageServiceMethodDescriptorSupplier(String methodName) {
      this.methodName = methodName;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {
      return getServiceDescriptor().findMethodByName(methodName);
    }
  }

  private static volatile io.grpc.ServiceDescriptor serviceDescriptor;

  public static io.grpc.ServiceDescriptor getServiceDescriptor() {
    io.grpc.ServiceDescriptor result = serviceDescriptor;
    if (result == null) {
      synchronized (WarningMessageServiceGrpc.class) {
        result = serviceDescriptor;
        if (result == null) {
          serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
              .setSchemaDescriptor(new WarningMessageServiceFileDescriptorSupplier())
              .addMethod(getWarningMessageMethod())
              .build();
        }
      }
    }
    return result;
  }
}
